# the lua-5.1.3 folder should contain the latest lua source code, you can always just change this script to point to the right place
cd ./lua-5.1.3/
rm *.o

# make LUA
make ansi

# Create a lua library for linking using ar
cd ../..
cp ./lua-5.1.3/src/*.o ./luaobj
rm ./luaobj/lua.o
rm ./luaobj/luac.o
rm lua.a
ar -r lua.a ./luaobj/*.o

# build the DLuaWrapperTest project
dmd DLuaWrapperTest.d dlua/*.d lua.a